package code.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSON;

import code.bean.User;

@RestController
@RequestMapping("/user")
public class UserController {
    @RequestMapping("/getUser")
    public String getUser(@RequestParam Long id) {
        User user = new User();
        user.setName("zs");
        user.setAge(24);
        return JSON.toJSONString(user);
    }
    @RequestMapping("/getUser2")
    public String getUser2(@RequestParam Long id) {
        User user = new User();
        user.setName("zy");
        user.setAge(25);
        return JSON.toJSONString(user);
    }
}
